﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace AspDotNet.Framework.Mvc.FirstDemo.Tools.Extension
{
    public static class FormCollectionExtension
    {
        public static Dictionary<string, string> GetAllData(this FormCollection form)
        {
            if (form.AllKeys.Count() < 1)
            {
                return new Dictionary<string, string>();
            }
            return form.AllKeys.ToDictionary(p => p, p => form[p]);

        }
    }
}
